package edu.jd.movieplatform.admin.a_cinema.dao;

import edu.jd.movieplatform.admin.a_cinema.a_Cinema;
import edu.jd.movieplatform.admin.a_cinema.a_CinemaDto;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface a_CinemaDao {
    List<a_Cinema> finda_CinemaList(a_CinemaDto dto);

    @Insert("insert into cinema(cnm_name,cnm_address,phone_number) values(#{cnm_name},#{cnm_address},#{phone_number})")
    void insertCinema(a_CinemaDto dto);

    @Delete("delete from cinema where cnm_id = #{id}")
    void deleteCinema(Integer id);

    @Update("update cinema set cnm_name=#{cnm_name},cnm_address=#{cnm_address},phone_number=#{phone_number} where cnm_id=#{cnm_id}")
    void updateCinema(a_CinemaDto dto);
}
